Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

#4082 add mutable accessors to QuorumProposalWrapper#4097

Open
pls148 wants to merge 1 commit into
mainfrom
ps/4082
Open

#4082 add mutable accessors to QuorumProposalWrapper#4097
pls148 wants to merge 1 commit into
mainfrom
ps/4082

Conversation

@pls148
Copy link
Copy Markdown
Contributor

@pls148 pls148 commented Jan 30, 2025

Closes EspressoSystems/espresso-network#2595

This PR:

This PR does not:

Key places to review:

@pls148 pls148 requested a review from bfish713 as a code owner January 30, 2025 23:29
Copy link
Copy Markdown
Contributor

@jparr721 jparr721 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, why bother adding mutable and immutable accessors when we could just make all the fields pub? Seems like this is just adding indirection.

Copy link
Copy Markdown
Collaborator

@bfish713 bfish713 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I feel like all these fields do not need mutable access

Copy link
Copy Markdown
Contributor

@ss-es ss-es left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's not clear we need all of these, but no objection from me

I think QuorumProposalWrapper is really a HotShot-internal type, and it makes sense to me to leave the fields private (or pub(crate) at most)

@pls148
Copy link
Copy Markdown
Contributor Author

pls148 commented Feb 3, 2025

The main driver here is espresso-sequencer and marketplace-builder-core needing to poke around at the internals of this structure and making it hard to move things around later. Specifically, they have to reference things like proposal.data.proposal.view_number to make changes, (almost?) entirely in their tests. When replacing QuorumProposal2 (which had these fields available at proposal.data.view_number) I had to make a ton of changes to to these repos when the intent of the code wasn't changing. That seems like it creates an unnecessary lock-step for change.

This may end up becoming irrelevant when we move to a monorepo though.

@pls148 pls148 requested review from bfish713 and jparr721 February 4, 2025 16:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create mutation methods on QuorumProposalWrapper

4 participants